package com.perceptivesoftware.licensing.client.dialogs.useradmin;

import com.extjs.gxt.ui.client.data.BaseTreeModel;
import com.perceptivesoftware.licensing.client.dialogs.useradmin.plugin.SecurityManagerNavItem;
import com.perceptivesoftware.licensing.client.dialogs.useradmin.plugin.SecurityManagerPlugin;

public class SecurityManagerNavModel extends BaseTreeModel {

	private final SecurityManagerNavItem securityManagerNavItem;
	private final SecurityManagerPlugin<?> securityManagerPlugin;

	SecurityManagerNavModel(final SecurityManagerNavItem securityManagerNavItem, final SecurityManagerPlugin<?> securityManagerPlugin) {
		super();
		this.securityManagerNavItem = securityManagerNavItem;
		this.securityManagerPlugin = securityManagerPlugin;
		set("name", getName());
	}

	public String getName() {
		return securityManagerNavItem.getName();
	}

	public String getIconStyleName() {
		return securityManagerPlugin.getIconStyle();
	}

	public SecurityManagerNavItem getSecurityManagerNavItem() {
		return securityManagerNavItem;
	}

	public SecurityManagerPlugin<? extends SecurityManagerNavItem> getSecurityManagerPlugin() {
		return securityManagerPlugin;
	}
}
